Skip to content

Conversation

@sasankkurnella
Copy link

@sasankkurnella sasankkurnella commented Jan 20, 2026

Fixes #3219

Documents that Linux users building Python from source need to install libbz2-dev and liblzma-dev (Debian/Ubuntu) or bzip2-devel and xz-devel (RHEL/Fedora/CentOS) before building Python to ensure the _bz2 and _lzma standard library modules are available.

This helps users who install Python via pyenv, asdf, or compile from source avoid cryptic import errors when running ComfyUI.


Test Evidence

N/A - This is a documentation-only change. No code behavior is modified, so no testing is required.

Visual Documentation

N/A - This PR does not change any user-facing behavior or UI. It only adds installation instructions to the README.md for Linux users building Python from source.


Summary of Changes

File Change
README.md Added a note about required system packages for Linux users who build Python from source

Why This Change?

Linux users who compile Python (via pyenv, asdf, or manual build) may encounter:

ModuleNotFoundError: No module named '_bz2'
ModuleNotFoundError: No module named '_lzma'

This happens because Python's build process silently skips these modules if the development libraries aren't installed beforehand. This documentation helps users avoid hours of debugging.

Fixes Comfy-Org#3219

Documents that Linux users building Python from source need to install
libbz2-dev and liblzma-dev (Debian/Ubuntu) or bzip2-devel and xz-devel
(RHEL/Fedora/CentOS) before building Python to ensure the _bz2 and
_lzma standard library modules are available.

This helps users who install Python via pyenv, asdf, or compile from
source avoid cryptic import errors when running ComfyUI.
@comfy-pr-bot
Copy link
Member

Test Evidence Check

⚠️ Warning: Test Explanation Missing

If this PR modifies behavior that requires testing, a test explanation is required. PRs lacking applicable test explanations may not be reviewed until added. Please add test explanations to ensure code quality and prevent regressions.

⚠️ Warning: Visual Documentation Missing

If this PR changes user-facing behavior, visual proof (screen recording or screenshot) is required. PRs without applicable visual documentation may not be reviewed until provided.

You can add it by:

  • GitHub: Drag & drop media directly into the PR description
  • YouTube: Include a link to a short demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

document Python bzip2 and lzma requirements

2 participants